; The Debates main menu start34: pload ehdeb 1 putup 0 415 p1 pfree 1 pload debtp 1 putup 0 96 p1 pfree 1 pload ebcams 1 putup 128 31 p1 pfree 1 if @tnum<>0 pload ebnav 1 putup 0 0 p1 pfree 1 endif menu34: set gonum 34 mn34: waitkey getkey k if @k==1 set num 1 goto menu341 else if @k==2 set title "ehpa04" set tnum 43 set first 176 set last 218 set back "eagle34" link eagle41 else if @k==3 xbkg set num 1 goto menu342 else if @k==chr(104)||@k==chr(72) goto help else if @k==chr(112)||@k==chr(80) xbkg2 link eagle3 menubk else if @k==chr(101)||@k==chr(69) xbkg pload edexit 1 putup 190 200 p1 pfree 1 mn34b: waitkey getkey k if @k==chr(13) exit else if @k==chr(27) xbkg pload debtp 1 putup 0 96 p1 pfree 1 goto menu34 else goto mn34b endif endif else goto mn34 endif endif endif endif endif endif ; Photo and Audio Introduction selection display menu341: set gonum 341 set abort on mn341: pload menum 1 pfade 9 1 pfree 1 pload debp$@num 1 set px (639-p1->xsize)/2 set py 67+((355-p1->ysize)/2) putup @px @py p1 pfree 1 set m "" if @num==1 cdplay 25 12 timer waitkey 1200 endif if @num==2 cdplay 26 9 timer waitkey 900 endif if @num==3 cdplay 27 18 timer waitkey 1800 endif if @num==4 cdplay 28 14 timer waitkey 1400 endif if @num==5 cdplay 29 14 timer waitkey 1400 endif if @num==6 cdplay 30 9 timer waitkey 900 endif if @num==7 cdplay 31 11 timer waitkey 1100 endif getkey m xstop cdstop if @num==7 pload ebkg 1 pfade 9 1 pfree 1 set tnum 1 set abort off goto start34 else set num @num+1 goto mn341 endif ; Milestones text selection display menu342: set gonum 342 mn342: color 0 rect 40 95 600 405 color 10 fload times15 1 fgaps 1 5 3 set buf readfile(debmt$@num$.doc) window 60 95 580 390 text @@buf . farfree(@buf) window set center on ffree 1 fload ibm8 1 text 0 115 "Page "$@num$" of 6" text 0 105 "Press for next or for prior." set center off ffree 1 mn342b: waitkey getkey k if @k==1 set num 1 goto menu341 else if @k==2 set title "ehpa04" set tnum 43 set first 176 set last 218 set back "eagle34" link eagle41 else if @k==chr(104)||@k==chr(72) goto help else if @k==chr(112)||@k==chr(80) xbkg2 link eagle3 menubk else if @k==chr(101)||@k==chr(69) xbkg pload edexit 1 putup 190 200 p1 pfree 1 mn342c: waitkey getkey k if @k==chr(13) exit else if @k==chr(27) xbkg goto menu342 else goto mn342c endif endif else if @k==chr(73)$chr(1)||@k==chr(72)$chr(1) if @num==6 set num 1 goto mn342 else set num @num+1 goto mn342 endif else if @k==chr(81)$chr(1)||@k==chr(80)$chr(1) if @num==1 set num 6 goto mn342 else set num @num-1 goto mn342 endif else goto mn342b endif endif endif endif endif endif endif help: pload apatch 1 putup 0 0 p1 pfree 1 pload eclbb 1 putup 0 29 p1 pfree 1 xbkg pload edhelp 1 putup 31 74 p1 pfree 1 fload ibm8 1 fgaps 1 4 2 set buf readfile(debhlp.doc) window 65 345 575 100 color 1 text @@buf . farfree(@buf) window ffree 1 hlp1: waitkey getkey k if @k==chr(13) if @gonum==34 xbkg pload debtp 1 putup 0 96 p1 pfree 1 pload ebcams 1 putup 128 31 p1 pfree 1 pload ebnav 1 putup 0 0 p1 pfree 1 goto menu34 else xbkg pload ebcams 1 putup 128 31 p1 pfree 1 pload ebnav 1 putup 0 0 p1 pfree 1 goto menu$@gonum endif else goto hlp1 endif xbkg: pload ebkgx 1 putup 0 67 p1 pfree 1 return xbkg2: pload eclbb 1 putup 0 29 p1 pfree 1 pload ebkgx 1 putup 0 67 p1 pfree 1 pload eclhx 1 putup 0 412 p1 pfree 1 return xStop: if len(@m) cdstop pload ebkg 1 pfade 0 1 pfree 1 set tnum 1 set abort off pop start34 else return endif ; ; CDINIT ; ; Check for CD-ROM driver and setup @drive ; cdinit: int 0x2f 0x1500,0 if @bx global drive chr(@cx+asc("A")) else global drive "" endif return cdplay: cdtrack @1 @3 @4 @5 cdcmd 132,@0,@2*75 cdcheck @0,cdplay return ; ; CDPLAYTO TRACK MINUTES SECONDS FRAMES TRACK MINUTES SECONDS FRAMES ; ; cdplayto: cdtrack @1 @2 @3 @4 local begin @0 cdtrack @5 @6 @7 @8 local end @0 cdcmd 132,@begin,@end-@begin cdcheck @0,cdplayto return ; ; CDSTOP ; ; Stop playing immediately ; cdstop: cdcmd 133,0,0 cdcheck @0,cdstop return ; ; CDRESUME ; ; Resume playing from where we issued a CDSTOP ; cdresume: cdcmd 136,0,0 cdcheck @0,cdresume return ; ; CDSEEK TRACK {MINUTES SECONDS FRAMES} ; ; Seek the CD player head to a track to minimize play startup time. ; Parameters are the same as CDPLAY. ; cdseek: cdtrack @1 @2 @3 @4 cdcmd 131,@0,0 cdcheck @0,cdseek return ; ; CDEJECT ; ; Open the CD drive's tray/door ; cdeject: local buf ofs("1") local bseg seg(@buf); poke @bseg @buf 0 ;Eject Disk cdcmd 12,@buf|(@bseg<<16),1 ;WRITE IOCTL Output cdcheck @0,cdeject return ; ; CDCLOSE ; ; Close the CD drive's tray/door ; cdclose: local buf ofs("1") local bseg seg(@buf); poke @bseg @buf 5 ;Close Tray cdcmd 12,@buf|(@bseg<<16),1 ;WRITE IOCTL Output cdcheck @0,cdclose return ; ; CDSTATUS ; ; Return CD Drive status and setup global variables @first and @last ; cdstatus: local buf ofs("123456") local bseg seg(@buf); poke @bseg @buf 10 ;Audio Disk Info cdcmd 3,@buf|(@bseg<<16),6 ;READ IOCTL Input cdcheck @0,cdstatus global first peek(@bseg,@buf+1)+0 global last peek(@bseg,@buf+2)+0 poke @bseg @buf 6 ;Device status cdcmd 3,@buf|(@bseg<<16),5 ;READ IOCTL Input cdcheck @0,cdstatus return peekl(@bseg,@buf+1) ; ; CDTRACK TRACK MINUTES SECONDS FRAMES ; ; Return the absolute sector number of a track ; cdtrack: local buf ofs("1234567") local bseg seg(@buf); poke @bseg @buf 11 ;Get Audio Track Info poke @bseg @buf+1 @1 ;track number cdcmd 3,@buf|(@bseg<<16),7 ;READ IOCTL Input cdcheck @0,cdtrack return peekl(@bseg,@buf+2)+(@2*60+@3)*75+@4 ;return track address cdcmd: local req ofs("12345678901234567890123456") local rseg seg(@req) poke @rseg @req 13 ;param length poke @rseg @req+1 0 ;subunit poke @rseg @req+2 @1 ;command code pokew @rseg @req+3 0 ;status pokel @rseg @req+5 0 0 ;reserved poke @rseg @req+13 1 ;address mode pokel @rseg @req+14 @2 ;begin pokel @rseg @req+18 @3 ;length pokel @rseg @req+22 0 ;reserved int 0x2f 0x1510,@req,asc(@drive)-asc("A"),,,,,seg(@req) if peek(@rseg,@req+4)&0x80 databegin "Unknown Error" "Write-protect violation" "Unknown unit" "Drive not Ready" "Unknown command" "CRC error" "Bad drive request structure length" "Seek Error" "Unknown media" "Sector not found" "Printer out of paper" "Write Fault" "Read Fault" "General failure" "Reserved 1" "Reserved 2" "Invalid disk change" dataend if peek(@rseg,@req+3)<16 dataskip peek(@rseg,@req+3)+1 endif return @ else return "" endif cdcheck: if @1!="" clearscr 0 fload ibm8 1 color 255 set center on text 0 200 @2$": "$@1 text 0 180 "Press any key to exit" set center off ffree 1 waitkey exit endif return prtstatus: if @1&1 text "Door Open"$chr(10) else text "Door Closed"$chr(10) endif if @1&2 text "Door unlocked"$chr(10) else text "Door locked"$chr(10) endif if @1&4 text "Supports cooked and raw reading"$chr(10) else text "Supports only cooked reading"$chr(10) endif if @1&8 text "Read/write"$chr(10) else text "Read only"$chr(10) endif if @1&16 text "Data read and plays audio/video tracks"$chr(10) else text "Data read only"$chr(10) endif if @1&32 text "Supports ISO-9660 interleaving using interleave size and skip factor"$chr(10) else text "No interleaving"$chr(10) endif if @1&128 text "Supports prefetching requests"$chr(10) else text "No Prefetching"$chr(10) endif if @1&256 text "Supports audio channel manipulation"$chr(10) else text "No audio channel manipulation"$chr(10) endif if @1&512 text "Supports HSG and Red Book addressing modes"$chr(10) else text "Supports HSG addressing mode"$chr(10) endif if @1&2048 text "No disc is present in the drive"$chr(10) else text "Disc is present in the drive"$chr(10) endif return